# Permissions

Each Adafruit IO user contains permissions which can be set and modified.

## Get All Permissions

> HTTP Request
> <div class="http"><span class="method-get">GET</span><code class="path">/api/v2/{username}/{type}/{type_id}/acl</code></div>

```shell
$ curl -H "X-AIO-Key: {io_key}" https://io.adafruit.com/api/v2/{username}/{type}/{type_id}/acl
```

```python
```

```cpp
```

```ruby
```

> Response Sample:

```json
[
  {
    "id": 0,
    "user_id": 0,
    "scope": "string",
    "scope_value": "string",
    "model": "string",
    "object_id": 0,
    "created_at": "string",
    "updated_at": "string"
  }
]
```

An array of permissions


### Path Parameters

Parameter |   Type  |  Required |       Description
--------- | ------- | --------- | -----------------------
username | string | true | a valid username string
type | string | true |
type_id | string | true |



## Create Permission

> HTTP Request
> <div class="http"><span class="method-post">POST</span><code class="path">/api/v2/{username}/{type}/{type_id}/acl</code></div>

```shell
$ curl -H "X-AIO-Key: {io_key}" https://io.adafruit.com/api/v2/{username}/{type}/{type_id}/acl
```

```python
```

```cpp
```

```ruby
```

> Response Sample:

```json
{
  "id": 0,
  "user_id": 0,
  "scope": "string",
  "scope_value": "string",
  "model": "string",
  "object_id": 0,
  "created_at": "string",
  "updated_at": "string"
}
```

New Permission


### Path Parameters

Parameter |   Type  |  Required |       Description
--------- | ------- | --------- | -----------------------
username | string | true | a valid username string
type | string | true |
type_id | string | true |


### Body Parameters

Parameter |   Type  |  Required |       Description
--------- | ------- | --------- | -----------------------
permission | object | true |



## Returns Permission

> HTTP Request
> <div class="http"><span class="method-get">GET</span><code class="path">/api/v2/{username}/{type}/{type_id}/acl/{id}</code></div>

```shell
$ curl -H "X-AIO-Key: {io_key}" https://io.adafruit.com/api/v2/{username}/{type}/{type_id}/acl{id}
```

```python
```

```cpp
```

```ruby
```

> Response Sample:

```json
{
  "id": 0,
  "user_id": 0,
  "scope": "string",
  "scope_value": "string",
  "model": "string",
  "object_id": 0,
  "created_at": "string",
  "updated_at": "string"
}
```

Permission response


### Path Parameters

Parameter |   Type  |  Required |       Description
--------- | ------- | --------- | -----------------------
username | string | true | a valid username string
type | string | true |
type_id | string | true |
id | string | true |



## Replace Permission

> HTTP Request
> <div class="http"><span class="method-put">PUT</span><code class="path">/api/v2/{username}/{type}/{type_id}/acl/{id}</code></div>

```shell
$ curl -H "X-AIO-Key: {io_key}" https://io.adafruit.com/api/v2/{username}/{type}/{type_id}/acl{id}
```

```python
```

```cpp
```

```ruby
```

> Response Sample:

```json
{
  "id": 0,
  "user_id": 0,
  "scope": "string",
  "scope_value": "string",
  "model": "string",
  "object_id": 0,
  "created_at": "string",
  "updated_at": "string"
}
```

Updated permission


### Path Parameters

Parameter |   Type  |  Required |       Description
--------- | ------- | --------- | -----------------------
username | string | true | a valid username string
type | string | true |
type_id | string | true |
id | string | true |


### Body Parameters

Parameter |   Type  |  Required |       Description
--------- | ------- | --------- | -----------------------
permission | object | true |



## Delete Permission

> HTTP Request
> <div class="http"><span class="method-delete">DELETE</span><code class="path">/api/v2/{username}/{type}/{type_id}/acl/{id}</code></div>

```shell
$ curl -H "X-AIO-Key: {io_key}" https://io.adafruit.com/api/v2/{username}/{type}/{type_id}/acl{id}
```

```python
```

```cpp
```

```ruby
```

> Response Sample:

```json
"string"
```

Deleted Permission successfully


### Path Parameters

Parameter |   Type  |  Required |       Description
--------- | ------- | --------- | -----------------------
username | string | true | a valid username string
type | string | true |
type_id | string | true |
id | string | true |










